import request from '@/utils/request'

// 获取客户数量
export const getClientNum = params => request({
  url: '/clients/count',
  params
})

// 获取客户列表
export const getClientList = params => request({
  url: '/clients',
  params
})

// 获取指定客户
export const getClientById = id => request({
  url: '/clients/' + id
})

// 编辑客户
export const editClient = data => request({
  url: '/clients/' + data.id,
  method: 'put',
  data
})

// 添加客户 --66
export const addClient = data => request({
  url: '/clients',
  method: 'post',
  data
})

// 删除客户
export const delClient = id => request({
  url: '/clients/' + id,
  method: 'delete'
})
